<template>
  <h2>当前求和为：{{ sum }}</h2>
  <button @click="sum++">sum+1</button>
  <hr>
  <h2>当前鼠标的坐标：(x: {{ coord.x }}, y: {{ coord.y }})</h2>
</template>

<script>
import {ref} from "vue";
import useCoord from "@/hooks/useCoord";
export default {
  name: "Demo",
  components: {},
  props: [],
  emits: [], // 用于注册VC的自定义事件，可不写，但会报警
  setup() {
    let sum = ref(0);

    let coord = useCoord();

    return {
      sum,
      coord
    }
  },
}
</script>

<style scoped>

</style>